﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Name="DelegateControlASCX"
xmlns="http://schemas.microsoft.com/pag/gax-core"
Bound="false">
	<DocumentationLinks>
		<Link Caption="MSDN: Control Element (Delegate Control)" Url="http://msdn.microsoft.com/en-us/library/ms469179.aspx" Kind="Documentation"/>
		<Link Caption="MSDN: How to: Customize a Delegate Control" Url="http://msdn.microsoft.com/en-us/library/ms470880.aspx" Kind="NextStep"/>
		<Link Caption="Using the Delegate Control to Add Meta Tags to SharePoint Pages" Url="http://www.mtelligent.com/journal/2008/1/11/using-the-delegate-control-to-add-meta-tags-to-sharepoint-pa.html" Kind="NextStep"/>
	</DocumentationLinks>
	<xi:include href="../../../TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
	<Caption>Delegate Control (.ASCX)</Caption>
	<Description>Adds a delegate template with a asxc control</Description>
	<HostData Priority="200">
		<Icon File="Help/Icons/icon_ASPNET.ico" />
		<CommandBar Menu="SPSFProjectASPNET"/>
		<CommandBar Menu="SPSFFolderASPNET"/>
		<spsf:MetaData
		  Visible="true"
		  BindingType="ElementManifestReference"
		  BindingTypeTemplate="ElementManifestReferenceTemplate"
		  TestType="BaseSiteFeatureRecipeRunner"
		  Enabled="true"
		  FeatureScopes="Web;Site;WebApplication;Farm"
		  CreateVSTemplate="true"
		  NotSandboxSupported="true"
		  Category="ASPNET" xmlns:spsf="http://www.spalmblogger.de">
			<spsf:Authors>
				<spsf:Author>Torsten Mandelkow</spsf:Author>
			</spsf:Authors>
			<spsf:VersionHistory>
				<spsf:VersionHistoryEntry>1.0 Initial Recipe</spsf:VersionHistoryEntry>
			</spsf:VersionHistory>
			<spsf:WebPageContent>
				<![CDATA[    * AdditionalPageHead
    * GlobalSiteLink0
    * GlobalSiteLink1
    * GlobalSiteLink2
    * SmallSearchInputBox
    * TopNavigationDataSource
    * PublishingConsole
    * QuickLaunchDataSource ]]>
			</spsf:WebPageContent>
			<spsf:Test>
				<spsf:TestCases>
					<spsf:TestCase Name="DefaultDelegateControlASCX" Type="SolutionTestCase">
						<spsf:TestCaseArguments>
							<spsf:TestCaseArgument Name="DelegateControlName">DelegateControlASCX</spsf:TestCaseArgument>
							<spsf:TestCaseArgument Name="DelegateControlId">AdditionalPageHead</spsf:TestCaseArgument>
						</spsf:TestCaseArguments>
						<spsf:TestExpectedDeployResults>
							<spsf:TestExpectedDeployResult Type="ManualCheck">In page content of page http://demo2010a/SitePages/Home.aspx a delegate in header is available</spsf:TestExpectedDeployResult>
						</spsf:TestExpectedDeployResults>
					</spsf:TestCase>
				</spsf:TestCases>
			</spsf:Test>
		</spsf:MetaData>
	</HostData>
	<Arguments>

		<xi:include href="../../BaseArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="../BaseFeatureArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="./BaseDelegateControlArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

	</Arguments>
	<GatheringServiceData>
		<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
			<Pages>
				<Page Type="SPALM.SharePointSoftwareFactory.Library.CustomWizardPages.FeatureSelectionPage, SPALM.SharePointSoftwareFactory.Library" />
				<xi:include href="./BaseDelegateControlPage.include" xmlns:xi="http://www.w3.org/2001/XInclude" />
			</Pages>
		</Wizard>
	</GatheringServiceData>

	<Actions CoordinatorServiceType="ConditionalCoordinator">

		<xi:include href="../../BaseStartingActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="../BaseFeatureActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<!-- elements.xml-->
		<Action
		  Name="CreateElementsXml"
		  Type="AddElementsDefinitionAction"
		  ParentFeatureName="$(ParentFeatureName)"
		  ElementsName="$(DelegateControlName)"
		  ElementsCategory="$(ElementsCategory)"
		  TemplateFileName="Text\DelegateControlASCX\elements.xml.t4"
		  SPDataTemplate="Text\DelegateControlASCX\SharePointProjectItem.spdata.t4"
		  Open="true">
			<Output Name="CreatedElementFolder" />
			<Output Name="CreatedElementFile" />
		</Action>

		<!-- add control to Controltemplates-->
		<Action
		  Name="AddControlTemplate"
		  Type="AddTemplateToItemAction"
		  DeploymentType="TemplateFile"
		  DeploymentPath="CONTROLTEMPLATES\$(SafeAppName)"
		  TemplateFileName="Text\DelegateControlASCX\DelegateControl.ascx.t4"
		  TargetFileName="$(DelegateControlName).ascx">
			<Input Name="ParentProjectFolder" ActionOutput="CreateElementsXml.CreatedElementFolder" />
		</Action>

		<xi:include href="../../BaseCASPolicyActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="../../BaseFinalActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

	</Actions>

</Recipe>